home *** CD-ROM | disk | FTP | other *** search
- function heavybot2_shot_fly1()
- local explosion = uniGetExecutor()
- explosion:setTransformOwner()
- local mshot1 = explosion:addSimpleEffect(ENET_EFFECT_PS_HEAVYBOT2SHOT_FLY)
- local shotlight = explosion:addSimpleEffect(ENET_EFFECT_HEAVYBOT2_LIGHTSPOT)
- -- waitDeath(explosion:addMoveEffect(ENET_EFFECT_MOVE_LINEARFLY,250,uniGetTarget()),1000)
- waitDeath(explosion:forwardFly(uniGetTarget(),250))
- mshot1:suspendedDestroy(4.0)
- local exp_ps = explosion:addSimpleEffect(ENET_EFFECT_PS_HEAVYBOT2SHOT_EXPLOSION)
- uniGetTarget():executeCommand(ENC_DAMAGED)
- pause(1.0)
- exp_ps:suspendedDestroy(1.5)
- shotlight:suspendedDestroy(1.5)
- pause(1.5)
- explosion:destroy()
- end
-
- registerCommand(ENSCRIPTSET_HEAVYBOT2SHOT,ENC_FIRE1,"heavybot2_shot_fly1")
-
- --
- -- dummy effect creation test
- --
- desc = getEffectDescriptionP(ENET_EFFECT_HEAVYBOT2SHOT_FLY)
- desc.ClassID = ENCLASS_DUMMY
- desc.EffectClassType = ENECT_GEOMETRY
-
- desc.ScriptSet = ENSCRIPTSET_HEAVYBOT2SHOT
- desc.RelativePosition = ENLOCALPOS_NOTSPECIFIED
- local vzbzd1 = D3DXVECTOR3:new(0,0,0)
- desc.LocalPosition = vzbzd1
- vzbzd1:delete()
- desc.MoveType = ENMOVE_FLY
-
- desc.ActivityType = ENACT_COMMANDSEMIACTIVE
- --
- -- end dummy effect creation test
- --
-
-
-
-
-
-
-
- --
- -- lightsource creation test
- --
- desc = getEffectDescriptionP(ENET_EFFECT_HEAVYBOT2_LIGHTSPOT)
- desc.ClassID = ENCLASS_LIGHTSOURCE
- desc.EffectClassType = ENECT_LIGHTSOURCE
-
- desc.ScriptSet = ENSCRIPTSET_UNKNOWN
- desc.RelativePosition = ENLOCALPOS_NOTSPECIFIED
- local vzbzd2 = D3DXVECTOR3:new(0,0,0)
- desc.LocalPosition = vzbzd2
- vzbzd2:delete()
- desc.ActivityType = ENACT_SEMIACTIVE
-
- -- add interpolators
- --desc.clearInterpolators()
-
- local interpolator = createInterpolator()
- interpolator:addKey(0.0,70.0)
- interpolator:addKey(10.0,70.0)
- interpolator:finalize(false)
- -- add interpolator on light range
- desc:addInterpolator(interpolator,getFieldOffset(EN_FIELD_LIGHT_RANGE))
-
- local interpolator = createInterpolator()
- interpolator:addKey(0.0,1.0)
- interpolator:addKey(1.0,0.0)
- interpolator:addKey(7.0,0.0)
- interpolator:finalize(false)
- -- add interpolator on R B colors
- desc:addInterpolator(interpolator,getFieldOffset(EN_FIELD_DIFFUSE_R))
- desc:addInterpolator(interpolator,getFieldOffset(EN_FIELD_DIFFUSE_B))
- desc:addInterpolator(interpolator,getFieldOffset(EN_FIELD_DIFFUSE_G))
-
-
-
- --
- -- end lightsource creation description
- --
-